export default {
  height: 'auto',
  calcHeight: 130,
  tip: false,
  searchShow: true,
  border: true,
  index: true,
  selection: true,
  dialogClickModal: false,
  indexWidth: 80,
  indexLabel: '编号',
  align: 'center',
  searchMenuSpan: 12,
  searchMenuPosition: 'right',
  labelWidth: 120,
  // dialogWidth: '40%',
  viewBtn: false,
  column: [
    {
      label: "主键",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "租户ID",
      prop: "tenantId",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建人",
      prop: "createUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建部门",
      prop: "createDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改人",
      prop: "updateUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改时间",
      prop: "updateTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "状态",
      prop: "status",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "是否已删除",
      prop: "isDeleted",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "备注",
      prop: "remark",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "所属计划",
      prop: "plan",
      type: "input",
      hide: true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: "间隔天数",
      prop: "interval",
      type: "input",
      with:20,
      rules: [
        {
          required: true,
          message: '请输入间隔天数',
          trigger: 'blur',
        },
      ],
      addDisplay: false,
      overHidden: true,
    },
    {
      label: '间隔周期',
      prop: 'intervalType',
      type: 'select',
      dicUrl: '/api/blade-system/dict-biz/dictionary?code=follow_interval_type',
      props: {
        label: 'dictValue',
        value: 'dictKey',
      },
      addDisplay: false,
      overHidden: true,
    },
    {
      label: '间隔时长',
      prop: 'intervalArr',
      type: 'dynamic',
      span: 24,
      hide: true,
      editDisplay: false,
      children: {
        index: false,
        align: 'center',
        type: 'form',
        headerAlign: 'center',
        rowAdd: (done) => {
          // ElMessage.success('新增回调'); // 使用 ElMessage
          done({ input: '默认值' });
        },
        rowDel: (row, done) => {
          // ElMessage.success('删除回调' + JSON.stringify(row)); // 使用 ElMessage
          done();
        },
        column: [
          {
            label: '天数',
            prop: 'day',
            min: 0,
            max: 600,
            type: 'number',
            rules: [
              {
                required: true,
                message: '请输入天数',
                trigger: 'blur',
              },
            ],
          },
          {
            label: '',
            prop: 'select',
            type: 'select',
            dicUrl: '/api/blade-system/dict-biz/dictionary?code=follow_interval_type',
            props: {
              label: 'dictValue',
              value: 'dictKey',
            },
            rules: [
              {
                required: true,
                message: '请选择间隔周期',
                trigger: 'blur',
              },
            ],
          }
        ]
      }
    },
    {
      label: "是否通知",
      prop: "notice",
      type: 'radio',
      border: true,
      value: '0',
      dicData: [
        { label: '否', value: '0' },
        { label: '是', value: '1' },
      ],
      span: 24,
      control: (val, form) => {
        if (val === '0') {
          form.checkbox = "";
          form.noticeContent = "";
          form.noticeTime = "";
          return {
            noticeType: {
              disabled: true,
            },
            noticeContent: {
              disabled: true,
            },
            noticeTime: {
              disabled: true,
            },
          };
        } else {
          form.noticeContent = "{医生姓名}医生预约您{随访日期}到{医院名称}进行随访";
          return {
            noticeType: {
              disabled: false,
            },
            noticeContent: {
              disabled: false,
              value: '{医生姓名}医生预约您{随访日期}到{医院名称}进行随访',
            },
            noticeTime: {
              disabled: false,
            },
          };
        }
      },
      overHidden: true,
    },
    /*{
      label: '选择通知方式',
      prop: 'noticeType',
      type: 'checkbox',
      border: true,
      dicData: [{
        label: '短信',
        value: '1'
      }, {
        label: '邮件',
        value: '2'
      }],
      span: 24,
      disabled: true,
      overHidden: true,
    },*/
    {
      label: "通知内容",
      prop: "noticeContent",
      type: 'textarea',
      minRows: 5,
      maxRows: 7,
      span: 24,
      value: '{医生姓名}医生预约您{随访日期}到{医院名称}进行随访',
      overHidden: true,
      disabled: true,
    },
    {
      label: '',
      prop: 'divider',
      component: 'elDivider',
      span: 24,
      params: {
        html: '<span style="color:red">“{医生姓名}”，“{随访日期}”，“{医院名称}”为模版占位符；发送消息时，会根据随访日期和计划执行人，自动替换</span>',
        contentPosition: 'left'
      },
      hide: true,
    },
    {
      label: "通知时间",
      prop: "noticeTime",
      type: 'checkbox',
      border: true,
      dicUrl: '/api/blade-system/dict-biz/dictionary?code=follow_notice_time',
      props: {
        label: 'dictValue',
        value: 'dictKey',
      },
      disabled: true,
      span: 24,
      overHidden: true,
    },
    {
      label: "创建时间",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      overHidden: true,
    },
  ]
}
